package com.yunshipei.manager;

import android.content.Context;

import com.fsck.k9.Account;
import com.fsck.k9.K9;
import com.fsck.k9.Preferences;
import com.yunshipei.EnterApplication;

public class EnterMailManager {
    private EnterMailManager() {

    }

    private static final class EnterMailManagerInner {
        private static final EnterMailManager instance = new EnterMailManager();
    }

    public static EnterMailManager getInstance() {
        return EnterMailManagerInner.instance;
    }

    public void exitEnterEmail(Context context) {
        Preferences p = Preferences.getPreferences(context);
        if (p == null) return;
        Account[] accounts = p.getAccounts();
        if (accounts == null) return;
        for (Account account : accounts) {
            p.deleteAccount(account);
        }
    }
}
